package main

import (
	"yundian/internel/app/logic"
	"yundian/internel/pkg/dbs"
	"yundian/internel/pkg/dingo"
)

func main() {
	//dingo.InitViper("./configs/weixin.yaml")
	//dingo.InitViper("./configs/zmtest-adm.yaml")
	dingo.InitViper("./configs/zhongman.yaml")
	//dingo.NewZapComponent().Step()
	dbs.NewMysqlComponent().Step()
	dbs.NewRedisComponent().Step()

	//logic.NewTaskLogic().SyncLogisticsStatus()

	//logic.NewTaskLogic().WeChatAppletMessagePush()
	logic.NewTaskLogic().OrderRelevanceSyncRecover("2021-12-16 10:00:00", "2021-12-20 00:00:00", 1)
	//logic.NewTaskLogic().OrderRelevanceSyncData()
	//logic.NewTaskLogic().AgentIncomeStatistics(2, "pcl")
	//logic.NewTaskLogic().OrderRelevanceSyncData()
	//logic.NewTaskLogic().OrderRelevanceSyncDate()
	//logic.NewTaskLogic().AutoCompleteMemberOrder()

	//var orderListUse []logic.OrderListUseType
	//orderSql := `SELECT o.*,p.branch_user_id,DATE_FORMAT(FROM_UNIXTIME(o.end_at), '%Y-%m-%d')end_date,DATE_FORMAT(
	//FROM_UNIXTIME(o.end_at), '%Y-%m')end_month FROM orders o LEFT JOIN places p ON o.place_id=p.id WHERE o.trade_no=?`
	//if db := global.Orm.Raw(orderSql, "ZM20210909100812936774").Find(&orderListUse); db.Error != nil {
	//	logs.Error(db.Error)
	//	return
	//}
	//logic.NewTaskLogic().OrderRelevanceSyncDataExec(orderListUse, 1)
	//list := dao.NewUserDao().QueryParentList(400592, 217).Unwrap().([]*users.UserModel)
	//fmt.Println(list)
}
